/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const purchaseRouter = {
  path: '/purchase',
  component: Layout,
  name: '进货',
  meta: {
    title: '进货',
    subtitle: '进货',
    icon: 'purchase'
  },
  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '采购',
      meta: { title: '采购', subtitle: '日常', icon: 'menu_order'},
      childrens: [
        {
          path: '/purchase/list',
          meta: { title: '采购单', subtitle:'采购',icon: 'menu_order',permissions:['purchase.query'],color:'true'}
        },
        {
          path: '/purchasereturn/list',
          meta: { title: '退货单', subtitle:'采购退货',icon: 'menu_order',permissions:['purchaseReturn.query']}
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '仓库',
      meta: { title: '仓库', subtitle: '供应商', icon: 'menu_order'},
      childrens: [
        {
          path: '/purchasein/list',
          meta: { title: '采购入库',subtitle:'入库', icon: 'menu_order',permissions:['purchasein.query'],color:'true'}
        },
        {
          path: '/purchaseout/list',
          meta: { title: '采购退货', subtitle:'退货',icon: 'menu_order',permissions:['purchaseout.query']}
        },
      ]
    },

    {
      path: '',
      component: Layout,
      name: '查询',
      meta: { title: '查询', subtitle: '查询', icon: 'menu_order'},
      childrens: [
        {
          path: '/purchaseReport/list',
          meta: { title: '进货汇总表',subtitle:'进货', icon: 'menu_report',permissions:['purchaseCountReport.query']}
        },
        {
          path: '/purchaseReport/detailed',
          meta: { title: '进货明细表',subtitle:'进货', icon: 'menu_report',permissions:['purchaseDetailReport.query']}
        },
      ]
    },

    // 注册路由
   {
      path: '/supplier/list',
      component: () => import('@/views/supplier/list'),
      name: 'supplier-list',
      meta: {title: '供应商档案', subtitle:'档案',icon: 'menu_supplier', permissions: ['supplier.query']},
      hidden: true
    },
    {
      path: '/supplier/add',
      component: () => import('@/views/supplier/add'),
      name: 'supplier-add',
      meta: {title: '新增供应商', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/supplier/edit',
      component: () => import('@/views/supplier/edit'),
      name: 'supplier-edit',
      meta: {title: '修改供应商', icon: 'menu_supplier'},
      hidden: true
    },
   {
      path: '/supplierCategory/list',
      component: () => import('@/views/supplierCategory/list'),
      name: 'supplierCategory-list',
      meta: {title: '供应商档案分类', subtitle:'档案',icon: 'menu_supplier', permissions: ['supplierCategory.query']},
      hidden: true
    },
    {
      path: '/supplierCategory/add',
      component: () => import('@/views/supplierCategory/add'),
      name: 'supplierCategory-add',
      meta: {title: '新增供应商分类', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/supplierCategory/edit',
      component: () => import('@/views/supplierCategory/edit'),
      name: 'supplierCategory-edit',
      meta: {title: '修改供应商分类', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/purchase/list',
      component: () => import('@/views/purchase/list'),
      name: 'purchase-list',
      meta: { title: '采购单', subtitle:'采购',icon: 'menu_order',permissions:['purchase.query']},
      hidden: true
    },
    {
      path: '/purchase/add',
      component: () => import('@/views/purchase/add'),
      name: 'purchase-add',
      meta: { title: '新增采购单', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchase/edit',
      component: () => import('@/views/purchase/edit'),
      name: 'purchase-edit',
      meta: { title: '修改采购单', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchase/view',
      component: () => import('@/views/purchase/view'),
      name: 'purchase-view',
      meta: { title: '采购单详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchasereturn/list',
      component: () => import('@/views/purchasereturn/list'),
      name: 'purchasereturn-list',
      meta: { title: '采购退货单', subtitle:'采购',icon: 'menu_order',permissions:['purchaseReturn.query']},
      hidden: true
    },
    {
      path: '/purchasereturn/add',
      component: () => import('@/views/purchasereturn/add'),
      name: 'purchasereturn-add',
      meta: { title: '新增采购退货单', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchasereturn/edit',
      component: () => import('@/views/purchasereturn/edit'),
      name: 'purchasereturn-edit',
      meta: { title: '修改采购退货单', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchasereturn/view',
      component: () => import('@/views/purchasereturn/view'),
      name: 'purchasereturn-view',
      meta: { title: '采购退货单详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/purchaseReport/list',
      component: () => import('@/views/purchaseReport/list'),
      name: 'purchaseReport-list',
      meta: { title: '进货汇总表',subtitle:'进货', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/purchaseReport/detailed',
      component: () => import('@/views/purchaseReport/detailed'),
      name: 'purchaseReport-detailed',
      meta: { title: '进货明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },


    {
      path: '/purchasein/list',
      component: () => import('@/views/purchasein/list'),
      name: 'purchasein-list',
      meta: { title: '采购入库',subtitle:'入库', icon: 'menu_order',permissions:['purchasein.query']},
      hidden: true
    },
    {
      path: '/purchasein/view',
      component: () => import('@/views/purchasein/view'),
      name: 'purchasein-view',
      meta: { title: '采购入库详情', icon: 'menu_order' },
      hidden: true
    },

    {
      path: '/purchaseout/list',
      component: () => import('@/views/purchaseout/list'),
      name: 'purchaseout-list',
      meta: { title: '退货出库', subtitle:'退货',icon: 'menu_order',permissions:['purchaseout.query']},
      hidden: true
    },
    {
      path: '/purchaseout/view',
      component: () => import('@/views/purchaseout/view'),
      name: 'purchaseout-view',
      meta: { title: '退货出库详情', icon: 'menu_order' },
      hidden: true
    },


  ]
}
export default purchaseRouter
